<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="all" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="classification" content="" />
<meta name="author" content="" />
<meta name="copyright" content="" />
<script type="text/javascript" src="js/common.js"></script>
</head>
<body>
<script type="text/javascript">
function addChildToForm(name, value, form)
{
    if ( typeof name != "string" || typeof value != "string" || typeof form == "undefined" )
    {
        return false;
    }
    var input = document.createElement("input");
    input.name = name;
    input.value = value;
    form.appendChild(input);
}
function addFileToForm(name, form)
{
    if ( typeof name != "string" || typeof form == "undefined" )
    {
        return false;
    }
    var input = document.createElement("input");
    input.name = name;
    input.type = "file";
    form.appendChild(input);
}
function uploadOnshelfGoodsWeb()
{
    var obj_form = $O("goods_form");
    obj_form.action = "http://localhost/jiajia/nanbeihuo/index.php?controller=goods&action=uploadonshelfgoodsweb";
    obj_form.method = "post";
    addChildToForm("callback", "uploadOnshelfGoodsWebCallback", obj_form);
    obj_form.submit();
    return false;
}
function onshelfGoodsXLS()
{
    var obj_form = $O("goods_xls_form");
    obj_form.action = "http://localhost/jiajia/nanbeihuo/index.php?controller=goods&action=onshelfgoodsxls";
    obj_form.method = "post";
    addChildToForm("callback", "onshelfGoodsXLSCallback", obj_form);
    obj_form.submit();
}

function addImg()
{
    var obj_form = $O("imgs_form");
    addFileToForm("imgs[]", obj_form);
    //obj_form.submit();
}

function uploadImgs()
{
    var obj_form = $O("imgs_form");
    obj_form.action = "http://localhost/jiajia/nanbeihuo/index.php?controller=img&action=uploadimgs";
    obj_form.method = "post";
    addChildToForm("callback", "uploadImgCallback", obj_form);
    obj_form.submit();
}
</script>
<button onclick="uploadImgs();return false;">提交</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<button onclick="addImg();return false;">添加</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<button onclick="onshelfGoodsXLS();return false;">xls导入</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<button onclick="uploadGoodsWeb();return false;">保存</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<button onclick="uploadGoodsWeb();return false;">同步</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br/>
<br/>
<form id="imgs_form" name="imgs_form" method="post" enctype="multipart/form-data">
图片1<input type="file" name="imgs[]" id="imgs1"></input>
图片2<input type="file" name="imgs[]" id="imgs2"></input>
图片3<input type="file" name="imgs[]" id="imgs3"></input>
图片4<input type="file" name="imgs[]" id="imgs4"></input>
<br/>
图片5<input type="file" name="imgs[]" id="imgs5"></input>
图片6<input type="file" name="imgs[]" id="imgs6"></input>
图片7<input type="file" name="imgs[]" id="imgs7"></input>
图片8<input type="file" name="imgs[]" id="imgs8"></input>
<br/>
<br/>
</form>
<br/>
</body>
</html>